package com.ahs.feign.accident;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ahs.client.UserClient;
import com.ahs.model.User;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;

@Service
public class UserRestFeign {

	@Autowired
	private UserClient userClient;
	
	@HystrixCommand(groupKey = "UserRestFeign", fallbackMethod = "fallBackCall")
	public List<User> findByAll(){
		return this.userClient.findByAll();
	}
	
	public List<User> fallBackCall() {
		return null;
	}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
